<template>
  <div class="box">
    <div v-for="(item, index) in list" :key="index" @click="liang(index)" :class="{static:statice==index}">
      {{ item.name }}
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    liang(index) {
      this.statice = index
    },
  },
  data() {
    return {
      statice: 0,
      list: [{ name: "首页" }, { name: "订单" }, { name: "我的" }],
    };
  },
};
</script>

<style scoped>
.box {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-around;
  border-top: 1px solid gray;
  height: 40px;
  line-height: 40px;
}
.box > div {
  height: 50px;
}
.box .static{
    color: aqua;
}
</style>